package top.lshaci.learning.springboot.redis.publish;

import lombok.AllArgsConstructor;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

/**
 * Pub
 *
 * @author lshaci
 * @since 1.0.0
 */
@Component
@AllArgsConstructor
public class Pub {

    private final StringRedisTemplate stringRedisTemplate;

    public void convertAndSend(String channel, Object message) {
        stringRedisTemplate.convertAndSend(channel, message);
    }
}
